<style>
.fui-goods-item .image .playbtn {
    background: rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
	padding-top:3rem;
    text-align: center;
    color: #fff;
}
.fui-tab {
    background: none;
}
.fui-tab a{font-size:0.85rem;line-height: 1.4;margin:0 0.5rem}
.fui-tab.fui-tab-danger a.active {
    color: {{main.syscolor||'red'}};
    border-color: {{main.syscolor||'red'}};
}
.fui-tab:after {
    height: 0;
}
</style>
	<div ng-if="pagedata.setting.no_typegoodstop!=1" class="fui-tab fui-tab-danger" style="margin-top:0.7rem;padding:0 0.5rem">
		<a ng-class="{'external':1,'active':pagedata.showtype==0}" ng-click="pagedata.upshowtype(0)">
			<div style="color:#333">精选</div>
			<div style="font-size:0.6rem;line-height:1.4;">为你推荐</div>
		</a>
		<a ng-if="!pagedata.setting.islivebankuai" ng-class="{'external':1,'active':pagedata.showtype==1}" ng-click="pagedata.upshowtype(1)">
			<div style="color:#333">直播</div>
			<div style="font-size:0.6rem;line-height:1.4;">主播力荐</div>
		</a>
		<a ng-class="{'external':1,'active':pagedata.showtype==2}" ng-click="pagedata.upshowtype(2)">
			<div style="color:#333">实惠</div>
			<div style="font-size:0.6rem;line-height:1.4;">便宜好货</div>
		</a>
		<a ng-class="{'external':1,'active':pagedata.showtype==3}" ng-click="pagedata.upshowtype(3)">
			<div style="color:#333">活动</div>
			<div style="font-size:0.6rem;line-height:1.4;">特价活动</div>
		</a>
	</div>
	<div ng-if="pagedata.showtype==0 || pagedata.showtype==2" class="fui-goods-group block" style="padding-top:0">
			<div ng-repeat="item in pagedata.list" class="fui-goods-item">
				<div ng-click="pagedata.gotoitem(item);" ng-class="{'image':1, 'echelon':item.active.title}" data-text="{{item.active.title}}" style="position:relative;background-image: url({{tomedia(item.image) ||'../core/resource/images/nopic.jpg'}})">
						<div ng-show="item.total <=0" class="salez" style="background-image: url({{tomedia(pagedata.shopset.saleout) || '../addons/jy_weishop/resource/images/salez.png'}}); "></div>
						<div ng-if="item.video" class="playbtn"><i class="icon icon-iconfontplay2" style="font-size:1.6rem;"></i></div>
				</div>
				<div class="detail">
					<div ng-click="pagedata.gotoitem(item);" class="name">
							<i ng-show="item.ispresell == 1" class="fui-tag fui-tag-danger">预售</i>
							<span ng-show="item.ispresell != 1" class="fui-tag fui-tag-danger" style="background:linear-gradient(to right,rgba(244,221,187,0.6),rgba(235,216,174,1));color:#512f0a;width:auto;font-weight:400">{{item.merchid>0?'商户':'直营'}}</span>
							{{item.title}}
					</div>
					<div class="price" style="margin-top: 0">
						<span class="text">￥{{item.active.price || item.price}}</span>
						<span href="javascript:" ng-click="pagedata.gotopicker(item);" class="syscolorred"><i class="icon icon-tianmaochaoshigouwuche"></i></span>
					</div>
				</div>
			</div>
	</div>
	<div ng-if="pagedata.showtype==1" ng-include="sys_html('shop/_livegoods','','','jy_mcaigou')"></div>
	<div ng-if="pagedata.showtype==3" ng-include="sys_html('shop/_salesgoods','','','jy_mcaigou')"></div>
	<div id="showtaobaoke"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
			<div class="modal-dialog" style="width:80%;left:10%;">
				<div class="wap-qrcode-container" style="border-radius:0.5rem;height:auto">
					<button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
					<p class="example1" style="padding:0.3rem;border-radius:0.5rem;margin:1rem;background:#FFFFCC">{{pagedata.copyinfo}}</p>
					<p ng-click="clip(pagedata.copyinfo)" class="example1 btn btn-sm btn-red-o">复制商品口令</p>
				</div>
			</div>
	</div>
<div ng-include="sys_html('goods/_subpicker','','','jy_weishop')"></div>
<script>
scope.pagedata.showtype=0;
scope.pagedata.gotoitem=function(item){
	if(item.pluginname=='jy_taobaoke'){
		$('#showtaobaoke').modal();
		scope.pagedata.selectgoods=item;
		scope.pagedata.copyinfo='【'+item.title+'】'+item.active.url+' 点击链接，再选择浏览器打开；或复制这段描述'+item.active.code+'后到《手机淘宝》';
		scope.$evalAsync();
	}else{
		scope.access_json(item.active.url || 'jy_mcaigou/goods.detail//id='+item.id);
	}
}
scope.pagedata.upshowtype=function(type){
	scope.pagedata.showtype=type;
	if(type==0){
		scope.tool.get_list('jy_mcaigou/goods.index/getlist/order=isrecommand',true);
	}
	if(type==1){
		scope.tool.get_list('jy_weishop/sale.live_index/getlist/order=ishot',true);
	}
	if(type==2){
		scope.tool.get_list('jy_mcaigou/goods.index/getlist/order=price',true);
	}
	if(type==3){
		scope.tool.get_list('jy_mcaigou/goods.index/getlist/order=sale_cuxiao',true);
	}
}
if(scope.pagedata.showtype==0 || scope.pagedata.showtype==2){
	scope.tool.get_list('jy_mcaigou/goods.index/getlist/order=isrecommand',true);
	scope.pagedata.scroll_bottom=function(){
		scope.tool.get_list('jy_mcaigou/goods.index/getlist/order=isrecommand');
	}
}
</script>
